import request from "../utils/request";

export async function getApiData(data) {
  return request({
    method: "post",
    url: `/dataApi/data`,
    data
  });
}

export async function getDataAPIList(params) {
  return request({
    method: "get",
    url: `/dataAPI/list`,
    params
  });
}

export async function getDataAPIAllList(params) {
  return request({
    method: "get",
    url: `/dataAPI/all`,
    params
  });
}

export async function addDataAPI(data) {
  return request({
    method: "post",
    url: `/dataAPI/add`,
    data
  });
}

export async function editDataAPI(data) {
  return request({
    method: "put",
    url: `/dataAPI/edit`,
    data
  });
}

export async function delDataAPI(data) {
  return request({
    method: "delete",
    url: `/dataAPI/del`,
    data
  });
}

export async function testDataAPI(data) {
  return request({
    method: "post",
    url: `/dataAPI/check`,
    data
  });
};
